string-occurrence ![Build Status](https://travis-ci.org/SamVerschueren/string-occurrence.svg?branch=master)
Get the number of occurrences of a string in a string
Install
$ npm install --save string-occurrence
Usage
const stringOccurrence = require('string-occurrence');
stringOccurrence('foo bar', 'foo');
stringOccurrence('foo bar\nfoo baz', 'foo');
stringOccurrence('foo bar\nfoo baz', ['foo', 'baz']);
API
stringOccurrence(input, search, [options])
input
Type: string
The string to search in.
search
Type: string
, string[]
The keyword or keywords to search for.
options
caseInsensitive
Type: boolean
Default: true
Perform a case insensitive match.
License
MIT © Sam Verschueren